* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    margin: 0;
    padding: 20px;
    background: #f5f5f7;
    color: #1d1d1f;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

h1 {
    margin: 0 0 2rem;
    color: #0066cc;
    font-size: 1.8rem;
}

.nav-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.current-path {
    font-size: 1.1rem;
    color: #666;
    word-break: break-all;
}

.upload-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.upload-button {
    position: relative;
    display: inline-block;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-button:hover {
    background: #0056b3;
}

#file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.directory-list, .file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.file-list {
    max-height: 100vh;
    overflow-y: scroll;

}
.file-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.directory-item, .file-item {
    padding: 12px;
    margin: 4px 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.directory-item:hover, .file-item:hover {
    transform: translateX(4px);
    border-color: #007bff;
}

.directory-link {
    text-decoration: none;
    color: #007bff;
    flex-grow: 1;
}

.file-link {
    text-decoration: none;
    word-break: break-all;
    color: #1d1d1f;
    margin-left: 12px;
    flex-grow: 1;
}

.download-button {
    margin-top: 1.5rem;
    padding: 12px 24px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.download-button:hover {
    background: #218838;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        border-radius: 0;
    }

    h1 {
        font-size: 1.5rem;
    }

    .directory-item, .file-item {
        padding: 10px;
        font-size: 0.9rem;
    }

    .upload-button {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .download-button {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
    }
}

/* 复选框样式美化 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #007bff;
}

/* 添加加载状态指示 */
.download-button[disabled] {
    background: #6c757d;
    cursor: not-allowed;
}

.download-button.loading {
    position: relative;
    color: transparent;
}

.download-button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 新增删除按钮样式 */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.delete-button {
    background: #dc3545;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
    margin-top: 12px;
}

.delete-button:hover {
    background: #c82333;
}

.delete-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }

    .delete-button {
        width: 100%;
        padding: 14px;
    }
}

.spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.warning {
    background: #ffc107;
    color: #000;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}